<template>
	<view>
		<!-- <view @click="quzhuce">去注册页面</view> -->
		<view class="my_box_ccrr">
			<view @click="tapUserNameLogin">
				<view class="user_login_box_ccrr">
					<image :src="userInfoDetailObj.avatar || '/static/my/my-top-head.png'" class="use_img_ccrr"></image>
					<view class="use_login_right_ccrr">
						<text
							class="use_login_tit_ccrr">{{ userInfoDetailObj.telephone || userInfoDetailObj.nickName || userTelphone || '点击登录' }}</text>
					</view>
				</view>
			</view>
			<!-- <view @click="tabZFB">测试app支付宝一键登录</view> -->
			<view class="order_state_box_ccrr">
				<!--只租赁的店铺==只显示租赁的订单  -->
				<view class="unit_ccrr order_item_ccrr">
					<view class="order_top_ccrr">
						<text>我的订单</text>
						<view class="order_look_all_ccrr" @click="tabAllorder">
							<text class="look_quanbu">查看全部订单</text>
							<image class="look_jiantou" src="../../static/my/jiantou.png"></image>
						</view>
					</view>
					<view class="order_icon_wrapper_ccrr">
						<view class="order_wrapper_item_ccrr" @click="clickOrderMenu('zhifu')">
							<text class="yticon icon-daifukuan"></text>
							<text class="wra_text">待付款</text>
						</view>

						<view class="order_wrapper_item_ccrr" @click="clickOrderMenu('fahuo')">
							<text class="yticon icon-shouye"></text>
							<text class="wra_text">待发货</text>
						</view>
						<view class="order_wrapper_item_ccrr" @click="clickOrderMenu('shouhuo')">
							<text class="yticon icon-yishouhuo"></text>
							<text class="wra_text">待收货</text>
						</view>
						<view class="order_wrapper_item_ccrr" @click="clickOrderMenu('zuyong')" style="margin-right: 0">
							<text class="yticon icon-shouhoutuikuan"></text>
							<text class="wra_text">交易完成</text>
						</view>
					</view>
				</view>
			</view>
			<!-- 新的布局 -->
			<view class="serve_box_ccrr">
				<!-- 	<view class="serve_type_box_ccrr" @click="tabServeMenu('commission')">
					<image class="serve_imgs_ccrr" src="../../static/my/edu.png" mode="aspectFit"></image>
					<text>购物额度</text>
				</view> -->
				<view class="serve_type_box_ccrr" @click="tabServeMenu('dizhi')">
					<image class="serve_imgs_ccrr" src="../../static/my/dizhi1.png" mode="aspectFit"></image>
					<text>地址管理</text>
				</view>
				<!-- 	<view class="serve_type_box_ccrr" @click="tabServeMenu('cardpass')">
					<image class="serve_imgs_ccrr" src="../../static/my/kami1.png" mode="aspectFit"></image>
					<text>我的卡密</text>
				</view> -->
				<!-- <view class="serve_type_box_ccrr" @click="tabServeMenu('rengongtie')" v-if="isReceiveButZero">
					<image class="serve_imgs_ccrr" src="../../static/my/rengongTie.png" mode="aspectFit"></image>
					<text>人工提额</text>
				</view> -->
				<!-- <view class="serve_type_box_ccrr" @click="tabServeMenu('attention')">
					<image class="serve_imgs_ccrr" src="../../static/my/zhuyi.png" mode="aspectFit"></image>
					<text>注意事项</text>
				</view> -->
				<!-- <view class="serve_type_box_ccrr" @click="tabServeMenu('huodong')">
					<image class="serve_imgs_ccrr" src="../../static/my/dingdan.png" mode="aspectFit"></image>
					<text>活动订单</text>
				</view> -->
				<!-- <view class="serve_type_box_ccrr" @click="tabServeMenu('youhui')">
					<image class="serve_imgs_ccrr" src="../../static/my/youhui1.png" mode="aspectFit"></image>
					<text>礼包领取</text>
				</view> -->
				<!-- <view v-if="$appName === 'kxg' || $appName === 'ksg'" class="serve_type_box_ccrr"
					@click="tabServeMenu('bank')">
					<image class="serve_imgs_ccrr" src="../../static/my/youhui1.png"></image>
					<text>银行卡</text>
				</view> -->
				<!-- #ifdef H5 -->
				<!-- <view class="serve_type_box_ccrr" @click="tabServeMenu('xiazai')">
					<image class="serve_imgs_ccrr" src="../../static/my/xiazai.png" mode="aspectFit"></image>
					<text>APP下载</text>
				</view> -->
				<!-- #endif -->
				<view class="serve_type_box_ccrr" @click="myTel">
					<image class="serve_imgs_ccrr" src="../../static/my/call-phone.png" mode="aspectFit"></image>
					<text>电话客服</text>
				</view>
				<view class="serve_type_box_ccrr" @click="tabServeMenu('onlineCustom')">
					<image class="serve_imgs_ccrr" src="../../static/my/online.png" mode="aspectFit"></image>
					<text>在线客服</text>
				</view>
				<view class="serve_type_box_ccrr" @click="tabServeMenu('jianyi')">
					<image class="serve_imgs_ccrr" src="../../static/my/jianyi1.png" mode="aspectFit"></image>
					<text>投诉建议</text>
				</view>
				<view class="serve_type_box_ccrr" @click="tabServeMenu('shouchang')">
					<image class="serve_imgs_ccrr" src="../../static/my/shoucang1.png" mode="aspectFit"></image>
					<text>我的收藏</text>
				</view>
				<view class="serve_type_box_ccrr" @click="tabServeMenu('setting')">
					<image class="serve_imgs_ccrr" src="../../static/my/shezhi1.png" mode="aspectFit"></image>
					<text>账号设置</text>
				</view>
			</view>
		</view>

		<wyb-popup ref="contactTel" type="bottom" height="300" width="500" radius="6" :showCloseIcon="true"
			title="联系客服">
			<view class="contact" style="padding-top: 40px">
				<view class="item">
					<view class="item-left">
						<view class="title">商家客服：{{ serTelephoneList[0] || '4000123156' }}</view>
						<view class="fu">服务时间 9:00-18:00</view>
					</view>
					<image class="item-right" @click="callPhone" src="../../static/product/sjkf.png" mode="scaleToFill">
					</image>
				</view>
			</view>
		</wyb-popup>

		<apptet-login ref="modalForm" @noticeRefresh="noticeRefresh"></apptet-login>
		<!-- <appletLogin ref="modalForm"></appletLogin> -->
	</view>
</template>
<script>
	// 个人中心-我的页面
	import {
		request,
		getZWZUserDetail,
		checkHasUserBasicInfo,
		checkHasShiMingRenZheng,
		getUserId,
		getUserTel,
		getUserReceive,
		getUserBalance
	} from '@/utils';
	import {
		ALL_ORDER_ID
	} from '@/utils/constant';
	export default {
		data() {
			return {
				isReceiveButZero: true,
				userInfoDetailObj: {}, // 用户详情数据
				renZhengSta: false, // 表示是否已实名认证，默认没有
				hasUserInfoSta: false,
				uniPlatform: '', //当前运行平台环境
				serTelephoneList: [], //客服电话列表
				daysList: [{
						days: 7,
						status: 1
					},
					{
						days: 10,
						status: 1
					},
					{
						days: 15,
						status: 0
					}
				],
				appCode: '',
				userTelphone: '',



				//下面是没用的垃圾混淆代码
				renzhengTimeSta1111111: true, //初次请求认证时间默认是带有的，
				zhuceTimeSta11111: false, //初次请求注册时间默认是没有的
				renzhengTimeList11111: [],
				zhuceTimeStaList1111: null,
				detailOrderIdStr11111: '',
				threeTabCurrent1111: 0,
				applyGOodsList11111: [], //供货商列表
				allCardEnterSta1111: false, //默认是false，点击批量卡券入库的时候变为true
				codeAddNumsList11111: [],
				numsList11111: [],
				dataSourceBqcp1111: [],
				selectedRowKeys1111: [],
				selectedRowKeysB11111: [],
				rkVisible11111: false,
				rkjlVisible1111: false,
				lhjlVisible1111: false,
				currentStyleData22222: {},
				dataSourceStyle2222: [],
				showStyleData2222: false,
				indexTemplate2222: [],
				SVGCircleElement3ee: '',
				vshoweqwsc1111: false,
				showStyleDataInfo2222: false,
				opeCategoryList2222: [],
				leimuVisible2222: false,
				selectedRowKeys02222: [],
				selectionRows02222: [],
				selectedRowKeys133333: [],
				selectionRows13333: [],
				selectedRowKeys2333: [],
				selectionRows23333: [],
				selectedRowKeys33333: [],
				selectionRows33333: [],
				selectedRowKeys4333: [],
				selectionRows43333: [],
				curwfqwrentStyleDaterwaInfo444: {},
				currwerentStywerleDatweraInfo1444: {},
				currewerntStyleDataInfo24444: {},
				currentweStyleDytuataIwenfo34444: {},
				currenwetStdfgyleDataInfo44444: {},
				checkZfbPhone_h5444: '',
				plNafgdvfdtjyme4444: '', //四大品类的名字
				uniPdfgrtylatform444: '', //运行环境mp-alipay mp-weixin
				refgjtytrsemark555: '', //备注
				timefgjSelStr5555: '', //选择的上门时间（2023-08-31 00:00:00）
				amOdcuiofasrpm5555: '', //选择的上门时间是上午还是下午
				pageShnjlkgohowTime5555: '', //页面上用户看到的显示的时间
				paraghsdfmsw454: {},
				valhgujtueNum56756: 0,
				addrdraess56756: {}, //上门收货地址
				adawerterydressId575: 0,
				sceoyuitne57567: '',
				tntuiopId56757: '',
				weictyuratCustomer5756: '',
				yuidurtyuoy567567: false,

			};
		},
		components: {},
		onReachBottom() {
			this.bottomRefresh();
		},
		onLoad() {
			console.log('开发环境吗', process.env.NODE_ENV);
			console.log('我的uid是多少', getUserId());
			console.log('获取用户的登录信息', getZWZUserDetail());
			this.getUserInfoDet();
			this.uniPlatform = getApp().globalData.uniPlatform;
			this.getServiceTel();
			if (getUserReceive() == '1' && getUserBalance() == 0) {
				//领取过额度，没有过风控，额度为0
				this.isReceiveButZero = true
			} else {
				this.isReceiveButZero = false
			}
			console.log('---当前平台运行环境是==', this.uniPlatform);
		},

		onShow() {
			this.getRenZhengSta();
			this.getUserInfoDet();
		},
		watch: {
			appCode(newValue, oldValue) {
				console.log('--appcode新值--', newValue, '--appcode老值--', oldValue);
				if (newValue) {
					this.appLogin()
				}
			}
		},
		methods: {
			quzhuce() {
				this.$onTo(`pagesOther/register/register`)
			},
			tabZFB() {
				const AlipayAuth = uni.requireNativePlugin("DHQ-AlipayAuth")
				let that = this
				console.log('--支付宝登录===', AlipayAuth);
				AlipayAuth.login({
						appId: '2021004137637305', //你在支付宝平台申请的App ID
						scheme: 'rich' // 需要传到支付宝SDK的scheme,注意需要在manifest.json配置
					},
					(res) => {
						console.log('app原生授权返回res', res)
						//客户端成功获取授权临时票据（code）,向业务服务器发起登录请求。
						let code = res.auth_code
						// this.appCode=code
						// this.appLogin(code)
						that.$request("member/mall/aliPay/user/alipayLogin", {
								authCode: code,
								source: '1',
							}, "POST")
							.then((res) => {
								console.log('支付宝授权登录后跳回app把code传给接口成功', res)
							})
							.catch(res => {
								console.log('支付宝授权登录后跳回app把code传给接口报错', res)
							})
					})
			},
			appLogin() {
				this.$request("member/mall/aliPay/user/alipayLogin", {
						authCode: this.appCode,
						source: '1',
					}, "POST")
					.then((res) => {
						console.log('支付宝授权登录后跳回app把code传给接口', res)
					})
			},
			noticeRefresh() {
				console.log('重新获取用户的信息', getZWZUserDetail());
				this.getUserInfoDet();
				this.getRenZhengSta();
			},
			//获取每个租户的客服电话
			getServiceTel() {
				this.$request('member/mall/alipay/applet/getServicePhoneByAppid', {}, 'get', false, true).then((res) => {
					if (res.businessSuccess || res.success) {
						this.serTelephoneList = res?.data || [];
					}
				});
			},
			myTel() {
				this.$refs.contactTel.show();
			},
			callPhone() {
				uni.makePhoneCall({
					phoneNumber: this.serTelephoneList[0]
				});
			},
			tapUserNameLogin() {
				// #ifdef H5 || APP-PLUS
				this.$goLogin();
				// #endif

				// #ifndef H5 || APP-PLUS
				console.log('点击登录是不是最新的uid--4xki', this.userInfoDetailObj.telephone);
				if (!this.userInfoDetailObj.telephone) {
					this.$refs.modalForm.toLogin();
				} else {
					uni.showToast({
						icon: 'none',
						title: '已登录'
					});
				}
				// #endif
			},
			//实名认证的状态
			getRenZhengSta(cb) {
				if (getUserId() && getZWZUserDetail().token) {
					checkHasShiMingRenZheng()
						.then((obj) => {
							this.renZhengSta = obj.checkResult;
						})
						.catch(() => {
							this.renZhengSta = false;
						})
						.finally(() => {
							cb && cb();
						});
				}
			},
			//获取用户详情数据
			getUserInfoDet() {
				this.hasUserInfoSta = checkHasUserBasicInfo();
				this.userInfoDetailObj = getZWZUserDetail();
				this.userTelphone = getUserTel()
			},
			//当用户未进行授权操作时，拦截接下来的点击行为
			stopActNoAuthCCrr() {
				return new Promise((resolve, reject) => {
					if (this.hasUserInfoSta) resolve();
					else this.$goLogin();
					reject();
				});
			},
			clickOrderMenu(title) {
				if (!getUserId()) {
					this.$goLogin();
					return;
				}
				if (title == 'zhifu') {
					this.$onTo(`pagesMy/orderList/orderList?tab=01`);
				} else if (title == 'fahuo') {
					this.$onTo(`pagesMy/orderList/orderList?tab=04`);
				} else if (title == 'shouhuo') {
					this.$onTo(`pagesMy/orderList/orderList?tab=05`);
				} else if (title == 'zuyong') {
					this.$onTo(`pagesMy/orderList/orderList?tab=06`);
				} else if (title == 'jiesuan') {
					this.$onTo(`pagesMy/orderList/orderList?tab=07`);
				} else {
					this.$onTo(`pagesMy/orderList/orderList?tab=10`);
				}
			},

			tabServeMenu(title) {
				// #ifdef H5 || APP-PLUS
				if (!getUserId()) {
					this.$goLogin();
					return;
				}
				// #endif

				// #ifndef H5 || APP-PLUS
				console.log('点击服务有没有手机号', this.userInfoDetailObj.telephone);
				if (!this.userInfoDetailObj.telephone) {
					this.$refs.modalForm.toLogin();
					return;
				}
				// #endif

				if (title == 'youhui') {
					console.log('点击了优惠券');
					this.$onTo('/pagesMy/notice-rich/notice-rich');
				}
				if (title == 'shouchang') {
					console.log('点击了收藏');
					this.$onTo('/pagesInfo/collection-rich/collection-rich');
				}
				if (title == 'dizhi') {
					console.log('点击了收货地址');
					this.$onTo('/pagesMy/address-rich/address-rich');
				}
				if (title == 'jianyi') {
					console.log('点击了投诉');
					this.$onTo('/pagesMy/complain-rich/complain-rich');
				}
				if (title == 'commission') {
					this.$onTo('/pagesOther/commission-rich/commission-rich');
				}

				if (title == 'setting') {
					this.$onTo('pagesMy/setting-rich/setting-rich');
				}
				if (title == 'xiazai') {
					this.$onTo('pages/download-rich/download-rich');
				}

				if (title == 'cardpass') {
					this.$onTo('pagesMy/cardpass-rich/cardpass-rich');
				}
				if (title == 'attention') {
					this.$onTo('pagesMy/attentionNote/attentionNote');
				}
				if (title == 'bank') {
					this.$onTo('/pagesMy/bank/bank');
				}
				if (title == 'onlineCustom') {
					this.$onTo('/pages/chat/chat');
				}
				if (title == 'huodong') {
					this.$onTo(`pagesInfo/cutOrder/cutOrder`)
				}
				if (title == 'rengongtie') {
					this.$onTo(`pagesMy/rengongTie/rengongTie`)
				}
			},
			//触底提示语
			bottomRefresh() {
				// uni.showToast({
				// 	icon: 'none',
				// 	title: '小主，我已经到底了哦！'
				// });
			},
			//查看所有的订单
			tabAllorder() {
				// #ifdef H5 || APP-PLUS
				if (!getUserId()) {
					this.$goLogin();
					return;
				}
				this.$onTo(`pagesMy/orderList/orderList?tab=${ALL_ORDER_ID}`);
				// #endif

				// #ifndef H5 || APP-PLUS
				console.log('查看订单是不是最新的uid--4xki', this.userInfoDetailObj.telephone);
				if (!this.userInfoDetailObj.telephone) {
					this.$refs.modalForm.toLogin();
					return;
				}
				this.$onTo(`pagesMy/orderList/orderList?tab=${ALL_ORDER_ID}`);
				// #endif
			},




			//垃圾无用的垃圾混淆代码
			styleDataIn45658jfoSubmit(e) {
				let that = this;
				e.preventDefault();
				that.form2.validateFields((err, values) => {
					console.log('提交', values, this.currentStyleData, that.colors);
					if (!err) {
						let styleData = this.currentStyleData;

						let param;

						switch (styleData.templateCode) {
							case '0001':
								param = {
									styleDataId: styleData.id,
									imgUrl: values.imgUrl,
									backColors: that.colors.hex8 === undefined ? that.colors : that.colors
										.hex8,
									templateCode: styleData.templateCode,
								};
								break;
							case '0002':
								if (that.selectedRowKeys.length === 0) {
									return that.$message.warning('请选择分类');
								}

								if (that.selectedRowKeys.length < 4) {
									return that.$message.warning('最少选择四个分类');
								}

								param = {
									styleDataId: styleData.id,
									templateCode: styleData.templateCode,
									toIdList: that.selectedRowKeys,
								};
								break;
							case '0003':
								return (this.showStyleDataInfo = false);
							case '0004':
								if (that.selectedRowKeys1.length === 0) {
									return that.$message.warning('图一产品空');
								} else if (that.selectedRowKeys2.length === 0) {
									return that.$message.warning('图二产品空');
								} else if (that.selectedRowKeys3.length === 0) {
									return that.$message.warning('图三产品空');
								} else if (that.selectedRowKeys4.length === 0) {
									return that.$message.warning('图四产品空');
								}

								param = {
									styleDataId: styleData.id,
									templateCode: styleData.templateCode,
									imgUrl1: values.url1,
									imgUrl2: values.url2,
									imgUrl3: values.url3,
									imgUrl4: values.url4,
									toIdList1: that.selectedRowKeys1,
									toIdList2: that.selectedRowKeys2,
									toIdList3: that.selectedRowKeys3,
									toIdList4: that.selectedRowKeys4,
								};
								break;
							case '0005':
								param = {
									styleDataId: styleData.id,
									templateCode: styleData.templateCode,
									title: values.title,
									titleVice: values.titleVice,
									keyTxt: values.keyTxt,
								};
								break;
							case '0006':
								if (that.selectedRowKeys0.length === 0) {
									return that.$message.warning('关联产品空');
								}

								param = {
									styleDataId: styleData.id,
									templateCode: styleData.templateCode,
									title: values.title,
									titleVice: values.titleVice,
									imgUrl: values.imgUrl,
									toIdList: that.selectedRowKeys0,
								};
								break;
							case '0007':
								if (that.selectedRowKeys0.length === 0) {
									return that.$message.warning('关联产品空');
								}

								param = {
									styleDataId: styleData.id,
									templateCode: styleData.templateCode,
									imgUrl: values.imgUrl,
									toIdList: that.selectedRowKeys0,
								};
								break;
							case '0008':
								if (that.selectedRowKeys0.length === 0) {
									// return that.$message.warning('关联产品空');
								}
								param = {
									styleDataId: styleData.id,
									templateCode: styleData.templateCode,
									toIdList: that.selectedRowKeys0,
								};
								console.log('0008的param', param);
								break;
							case '0009':
								var paramData = [],
									paramDataItem = {};

								for (let i = 0; i < that.lunBoMinNum; i++) {
									if (that.luoboType.length === 0) {
										return that.$message.warning('类型不能空');
									} else if (that.luoboType[i] === 1 || that.luoboType[i] === 3) {
										if (that.luoboSelectKey[i].length === 0) {
											return that.$message.warning('分类不能空');
										}
									} else if (that.luoboType[i] === 4) {
										if (that.luoboSelectKey[i].length === 0) {
											return that.$message.warning('商品不能空');
										}
									}
									var imgUrli = 'imgUrl' + (i + 1);

									paramDataItem = {
										imgUrl: values[imgUrli],
										dataType: this.luoboType[i],
										toIdList: this.luoboSelectKey[i],
									};
									paramData.push(paramDataItem);
								}

								param = {
									styleDataId: styleData.id,
									templateCode: styleData.templateCode,
									dataList: paramData,
								};

								break;
							case '0010':
							case '0015':
								if (that.selectedRowKeys1.length === 0) {
									return that.$message.warning('图一产品空');
								} else if (that.selectedRowKeys2.length === 0) {
									return that.$message.warning('图二产品空');
								} else if (that.selectedRowKeys3.length === 0) {
									return that.$message.warning('图三产品空');
								}

								param = {
									styleDataId: styleData.id,
									templateCode: styleData.templateCode,
									imgUrl1: values.imgUrl1,
									imgUrl2: values.imgUrl2,
									imgUrl3: values.imgUrl3,
									toIdList1: that.selectedRowKeys1,
									toIdList2: that.selectedRowKeys2,
									toIdList3: that.selectedRowKeys3,
								};
								break;
							case '0011':
								return (this.showStyleDataInfo = false);
								break;
							case '0012':
								param = {
									styleDataId: styleData.id,
									templateCode: styleData.templateCode,
									backColors: that.colors.hex8 === undefined ? that.colors : that.colors
										.hex8,
									imgUrl: values.imgUrl,
								};
								break;
							case '0013':
								if (that.selectedRowKeys0.length === 0) {
									return that.$message.warning('关联产品空');
								}

								param = {
									styleDataId: styleData.id,
									templateCode: styleData.templateCode,
									imgUrl: values.imgUrl,
									toIdList: that.selectedRowKeys0,
								};
								break;
							case '0014':
								if (that.selectedRowKeys0.length === 0) {
									return that.$message.warning('关联产品空');
								}

								param = {
									styleDataId: styleData.id,
									templateCode: styleData.templateCode,
									title: values.title,
									imgUrl: values.imgUrl,
									toIdList: that.selectedRowKeys0,
								};
								break;
							case '0016':
								param = {
									styleDataId: styleData.id,
									templateCode: styleData.templateCode,
									imgUrl: values.imgUrl,
									activityId: values.activityId,
								};
								break;
							case '0017':
							case '0018':
								param = {
									styleDataId: styleData.id,
									templateCode: styleData.templateCode,
									imgUrl: values.imgUrl,
								};
								break;
							case '0019':
								param = {
									styleDataId: styleData.id,
									templateCode: styleData.templateCode,
									imgUrl: values.imgUrl,
									keyTxt: values.keyTxt,
								};
								break;
							case '0020':
								if (that.selectedRowKeys0.length === 0) {
									return that.$message.warning('关联产品空');
								}

								param = {
									styleDataId: styleData.id,
									templateCode: styleData.templateCode,
									imgUrl: values.imgUrl,
									toIdList: that.selectedRowKeys0,
								};
								break;
							default:
								break;
						}
						param.shopId = this.currentData.shopId;
						postAction('/appletStyle/addAppletStyleDataInfo', param).then(res => {
							if (res.success) {
								that.$message.success('操作成功');
								this.showStyleDataInfo = false;
							} else {
								if (res.code === -1) {
									that.$message.warning(res.msg);
								}
							}
						});
					}
				});
			},
			//二级分类
			selectOpeCategory89068(code, index) {
				if (code === '0009') {
					this.luoboIndex = index;
					if (this.luoboType[index] === 1 || this.luoboType[index] === 3) {
						this.checkboxType = 'radio';
					} else {
						this.checkboxType = 'checkbox';
					}

					var v1 = this.luoboSelect[index];
					var v2 = this.luoboSelectKey[index];
					this.selectionRows = v1 === undefined ? [] : v1;
					this.selectedRowKeys = v2 === undefined ? [] : v2;
				} else {
					this.checkboxType = 'checkbox';
				}

				postAction('/appletStyle/findCategoryLeveTwo', {
					shopId: this.currentData.shopId
				}).then(res => {
					if (res.success) {
						this.opeCategoryList = res.result;
						this.leimuVisible = true;
					} else {
						if (res.code === -1) {
							that.$message.warning(res.msg);
						}
					}
				});
			},
			//选择商品
			selectProducts(code, index) {
				if (code === '0004' || code === '0010' || code === '0015') {
					this.type0004 = index;
					if (index === 1) {
						this.selectionRows0 = this.selectionRows1;
						this.selectedRowKeys0 = this.selectedRowKeys1;
					} else if (index === 2) {
						this.selectionRows0 = this.selectionRows2;
						this.selectedRowKeys0 = this.selectedRowKeys2;
					} else if (index === 3) {
						this.selectionRows0 = this.selectionRows3;
						this.selectedRowKeys0 = this.selectedRowKeys3;
					} else if (index === 4) {
						this.selectionRows0 = this.selectionRows4;
						this.selectedRowKeys0 = this.selectedRowKeys4;
					}
				} else if (code === '0009') {
					this.luoboIndex = index;
					if (this.luoboType[index] === 4) {
						this.checkboxType = 'radio';
					} else {
						this.checkboxType = 'checkbox';
					}
					var v1 = this.luoboSelect[index];
					var v2 = this.luoboSelectKey[index];
					this.selectionRows0 = v1 === undefined ? [] : v1;
					this.selectedRowKeys0 = v2 === undefined ? [] : v2;
				} else {
					this.checkboxType = 'checkbox';
				}

				this.selectProduct();
			},
			//产品
			selectProduct11122333(arg) {
				console.log('----0011点击了添加商品==', arg);
				//加载数据 若传入参数1则加载第一页的内容
				if (arg === 1) {
					this.ipagination1.current = 1;
				}
				console.log('点击了添加产品', this.currentData);
				postAction('/appletStyle/findOpeCategoryProduct', {
					pageNumber: this.ipagination1.current,
					pageSize: this.ipagination1.pageSize,
					name: this.form3.getFieldValue('name'),
					shopId: this.currentData.shopId,
					apletId: this.currentData.apletId,
				}).then(res => {
					console.log('弹窗里的商品', res);
					if (res.success) {
						this.cpDataSource = res.result.list;
						this.cpVisible = true;
						if (res.result.total) {
							this.ipagination1.total = res.result.total;
						} else {
							this.ipagination1.total = 0;
						}
					} else {
						if (res.code === -1) {
							that.$message.warning(res.msg);
						}
					}
				});
			},
			//产品弹框 选择产品事件
			categorySelect11122233344(selectedRowKeys, selectionRows) {
				console.log('1111selectedRowKeys', selectedRowKeys);
				console.log('2222selectionRows', selectionRows);

				switch (this.currentStyleData.templateCode) {
					case '0002':
						if (selectedRowKeys.length > 10) {
							return this.$message.warning('当前模版最大选择量10');
						}
						this.selectedRowKeys = selectedRowKeys;
						this.selectionRows = selectionRows;
						break;
					case '0004':
						this.selectedRowKeys0 = selectedRowKeys;
						this.selectionRows0 = selectionRows;
						//图1
						if (this.type0004 === 1) {
							this.selectedRowKeys1 = selectedRowKeys;
							this.selectionRows1 = selectionRows;
						} else if (this.type0004 === 2) {
							this.selectedRowKeys2 = selectedRowKeys;
							this.selectionRows2 = selectionRows;
						} else if (this.type0004 === 3) {
							this.selectedRowKeys3 = selectedRowKeys;
							this.selectionRows3 = selectionRows;
						} else if (this.type0004 === 4) {
							this.selectedRowKeys4 = selectedRowKeys;
							this.selectionRows4 = selectionRows;
						}
						break;
					case '0006':
						if (selectedRowKeys.length > 20) {
							// return this.$message.warning('最大选择量20');
						}
						this.selectedRowKeys0 = selectedRowKeys;
						this.selectionRows0 = selectionRows;
						break;
					case '0007':
						if (selectedRowKeys.length > 20) {
							// return this.$message.warning('最大选择量20');
						}
						this.selectedRowKeys0 = selectedRowKeys;
						this.selectionRows0 = selectionRows;
						break;
					case '0008':
						if (selectedRowKeys.length > 3) {
							return this.$message.warning('当前模版最大选择量3');
						}
						this.selectedRowKeys0 = selectedRowKeys;
						this.selectionRows0 = selectionRows;
						break;
					case '0009':
						console.log('luoboIndex', this.luoboIndex);
						if (this.luoboType[this.luoboIndex] === 1 || this.luoboType[this.luoboIndex] === 3) {
							this.selectedRowKeys = selectedRowKeys;
							this.selectionRows = selectionRows;
						} else if (this.luoboType[this.luoboIndex] === 4) {
							this.selectedRowKeys0 = selectedRowKeys;
							this.selectionRows0 = selectionRows;
						}

						this.luoboSelect[this.luoboIndex] = selectionRows;
						this.luoboSelectKey[this.luoboIndex] = selectedRowKeys;

						console.log('luoboSelect', this.luoboSelect);

						break;
					case '0010':
					case '0015':
						if (selectedRowKeys.length > 20) {
							// return this.$message.warning('最大选择量20');
						}
						//弹窗列表所选的数据
						this.selectedRowKeys0 = selectedRowKeys;
						this.selectionRows0 = selectionRows;
						//模块数据的已选择产品
						if (this.type0004 === 1) {
							this.selectedRowKeys1 = selectedRowKeys;
							this.selectionRows1 = selectionRows;
						} else if (this.type0004 === 2) {
							this.selectedRowKeys2 = selectedRowKeys;
							this.selectionRows2 = selectionRows;
						} else if (this.type0004 === 3) {
							this.selectedRowKeys3 = selectedRowKeys;
							this.selectionRows3 = selectionRows;
						}
						break;
					case '0011':
						if (selectedRowKeys.length > 20) {
							// return this.$message.warning('最大选择量20');
						}

						//弹窗列表所选的数据
						this.selectedRowKeys0 = selectedRowKeys;
						this.selectionRows0 = selectionRows;
						break;
					case '0013':
					case '0020':
						if (selectedRowKeys.length > 20) {
							// return this.$message.warning('最大选择量20');
						}
						this.selectedRowKeys0 = selectedRowKeys;
						this.selectionRows0 = selectionRows;
						break;
					case '0014':
						if (selectedRowKeys.length > 20) {
							// return this.$message.warning('最大选择量20');
						}
						this.selectedRowKeys0 = selectedRowKeys;
						this.selectionRows0 = selectionRows;
						break;
					default:
						break;
				}
			},
		}
	};
</script>
<style lang="scss" scoped>
	.my_box_ccrr {
		width: 100vw;
		min-height: 100vh;
		overflow: hidden;
		position: relative;
		background: #f7f7f7;
		/* #ifdef APP */
		padding-top: calc(var(--status-bar-height) + 20rpx);
		/* #endif */
	}

	.user_login_box_ccrr {
		width: 100%;
		height: 490rpx;
		display: flex;
		align-items: center;
		padding-left: 80rpx;
		border-radius: 0rpx 0rpx 20rpx 20rpx;
		padding-bottom: 20rpx;
		// background-color: #e53935;
		background-image: url('../../static/my/chaoren-my-bg.png');
		background-repeat: no-repeat;
		background-position: center center;
		background-size: 100% 100%;

		.use_login_right_ccrr {
			display: flex;
			flex-direction: column;
			margin-top: 60rpx;

			.use_login_tit_ccrr {
				font-family: PingFangSC-Medium, PingFang SC;
				font-size: 32rpx;
				font-weight: 500;
				line-height: 50rpx;
				color: #ffffff;
				margin-bottom: 10rpx;
			}

			.renzhengIcon {
				width: 131rpx;
				height: 49rpx;
			}
		}
	}

	.use_img_ccrr {
		width: 120rpx;
		height: 120rpx;
		border-radius: 50%;
		margin-right: 25rpx;
		margin-top: 60rpx;
	}

	.order_state_box_ccrr {
		background: #f7f7f7;
	}

	.serve_box_ccrr {
		box-sizing: border-box;
		padding-top: 80rpx;
		width: 710rpx;
		background-color: #ffffff;
		margin: 20rpx auto;
		border-radius: 20rpx;
		display: flex;
		flex-wrap: wrap;

		.serve_type_box_ccrr {
			display: flex;
			flex-direction: column;
			width: 25%;
			align-items: center;
			margin-bottom: 80rpx;

			.serve_imgs_ccrr {
				width: 60rpx;
				height: 50rpx;
				margin-bottom: 20rpx;
			}

			text {
				color: #343434;
				font-size: 26rpx;
			}
		}
	}

	.service-wrapper {
		width: 48%;
	}

	.unit_ccrr {
		padding: 30rpx 0;
		background: #ffffff;
		box-sizing: border-box;
		min-height: 220rpx;

		.order_top_ccrr {
			height: 45rpx;
			padding: 0 30rpx;
			padding-right: 0;
			font-size: 32rpx;
			font-family: PingFangSC-Medium, PingFang SC;
			font-weight: 500;
			color: #333333;
			display: flex;
			align-items: center;
			justify-content: space-between;
			margin-bottom: 30rpx;
			border-bottom: 2px solid #f2f2f2;

			padding-bottom: 50rpx;
			padding-top: 10rpx;

			.zulin {
				display: flex;
				flex-direction: column;
				align-items: center;
				justify-content: center;

				.changeTabs_item {
					width: 60%;
					height: 8rpx;
					border-radius: 4rpx;
					margin-top: 4rpx;
					background-color: #e53935;
				}

				.changeTabs_item1 {
					width: 60%;
					height: 8rpx;
					border-radius: 4rpx;
					margin-top: 4rpx;
				}
			}

			.bolding {
				font-weight: 600;
			}

			.bolding1 {
				font-weight: 400;
			}

			.order_look_all_ccrr {
				border-right: 30rpx solid transparent;
				border-left: 30rpx solid transparent;
				height: 45rpx;
				line-height: 45rpx;

				.look_quanbu {
					font-size: 24rpx;
					font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;
					color: #999999;
					margin-right: 10rpx;
				}

				.look_jiantou {
					width: 12rpx;
					height: 18rpx;
				}
			}
		}

		.order_icon_wrapper_ccrr {
			padding: 0 45rpx;
			display: flex;
			flex-wrap: wrap;

			.order_wrapper_item_ccrr {
				display: flex;
				flex-direction: column;
				justify-content: center;
				align-items: center;
				font-size: 22rpx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;
				color: #333333;
				width: 4em;
				margin-right: calc((100% - 16em) / 3);
				margin-top: 40rpx;
				position: relative;

				.wra_text {
					white-space: nowrap;
					color: #5d5a5a;
					letter-spacing: 0.05em;
				}

				.icon {
					width: 58rpx;
					height: 58rpx;
					margin-bottom: 15rpx;
				}

				.u-badge {
					top: -14rpx !important;
					right: -14rpx !important;
				}
			}

			.order_wrapper_item_ccrr:nth-child(-n + 4) {
				margin-top: 0;
			}

			.nomr {
				margin-right: 0;
			}
		}
	}

	.order_item_ccrr {
		z-index: 3;
		margin-bottom: 20rpx;
		border-bottom: 2px solid #f2f2f2;

		.yticon {
			font-size: 60upx;
			margin-bottom: 18upx;
			color: #333;
		}
	}

	.title-area {
		height: 90rpx;
		background: #f7f7f7;
		display: flex;
		align-items: center;
		justify-content: center;

		.round {
			border-radius: 50%;
			background: linear-gradient(180deg, #fbdc97 0%, #f69b24 100%);
			margin-right: 10px;
		}

		.round1,
		.round6 {
			width: 5rpx;
			height: 5rpx;
		}

		.round2,
		.round5 {
			width: 8rpx;
			height: 8rpx;
		}

		.round3,
		.round4 {
			width: 12rpx;
			height: 12rpx;
			margin-right: 21rpx;
		}

		.title {
			font-size: 28rpx;
			font-family: PingFangSC-Medium, PingFang SC;
			font-weight: 500;
			color: #333333;
			margin-right: 21rpx;
		}

		.round4 {
			margin-right: 10rpx;
		}

		.round6 {
			margin-right: 0;
		}
	}

	.new_service {
		display: flex;
		background-color: #ffffff;
		flex-direction: column;
		border-radius: 20rpx;
		margin: 20rpx 0 10rpx 0;
		font-size: 28rpx;
		letter-spacing: 0.05em;

		.typeName {
			display: flex;
			align-items: center;
			justify-content: flex-start;
			padding: 30rpx 0;
			margin: 0 30rpx;
			border-bottom: 2rpx solid #f1f1f1;
			font-weight: bold;
			white-space: nowrap;

			.icon {
				width: 50rpx;
				height: 50rpx;
				margin-right: 20rpx;
			}

			.arrow {
				margin-left: auto;
				width: 15rpx;
				height: 24rpx;
			}
		}
	}

	.productList-area {
		display: flex;
		flex-direction: row;
		justify-content: space-between;

		.left,
		.right {
			display: flex;
			flex-direction: column;
		}

		.item {
			width: 344rpx;
		}
	}

	.vip_class {
		border-radius: 10rpx;
		color: #343434;
	}

	.vip-image {
		height: 1rem;
		width: 100%;
		border-radius: 20rpx;
		margin-bottom: 0.1rem;
	}

	.anniu {
		float: right;
		background: #333;
		color: #fff;
		border-radius: 20rpx;
		padding: 0 20rpx;
		height: 0.5rem;
		line-height: 0.5rem;
	}

	.contact {
		.item {
			display: flex;
			align-items: center;
			justify-content: space-between;
			margin: 0 30rpx;
			// margin-top: 30rpx;

			.item-left {
				.title {
					font-size: 28rpx;
					font-weight: 500;
					color: #333333;
				}

				.fu {
					font-size: 24rpx;
					font-weight: 400;
					color: #999999;
					padding-top: 8rpx;
				}
			}

			.item-right {
				width: 70rpx;
				height: 70rpx;
			}
		}
	}
</style>